<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div style="display: none"><script id="myEditorImage" type="text/plain"></script></div>
<div class="pageContent">
	<form method="post" action="${rootUrl}/goods/goods-type-value<c:if test="${goodsTypeValue.id != 0 && goodsTypeValue.id != '' }">/${goodsTypeValue.id}</c:if>" class="pageForm required-validate" onsubmit="return beforSub(this)">
		<c:if test="${goodsTypeValue.id != 0 && goodsTypeValue.id != '' }"><input type="hidden" name="_method" value="put"></c:if>
		<input type="hidden" name="goodsTypeValue.id" value="${goodsTypeValue.id }">
		<input type="hidden" name="goodsTypeValue.goods.id" value="${goodsTypeValue.goods.id }">
		<input type="hidden" name="goodsTypeValue.goods.version" value="${goodsTypeValue.goods.version }">
		<input type="hidden" id="typeValueId" name="goodsTypeValue.typeValueId" value="${goodsTypeValue.typeValue.id }">
		<input type="hidden" id="typeClassId" name="goodsTypeValue.typeClassId" value="${goodsTypeValue.typeClass.id }">
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>商品名称：</label>
				<input type="text" readonly="readonly" value="${goodsTypeValue.goods.name }" />
			</p>
			<p>
				<label>类型名称：</label>
				<input type="text" readonly="readonly" name="goodsTypeValue.typeClassName" value="${goodsTypeValue.typeClassName }" />
			</p>
			<p>
				<label>类型编码：</label>
				<input type="text" readonly="readonly" name="goodsTypeValue.typeClassCode" size="30" value="${goodsTypeValue.typeClassCode }" />
			</p>
			<p>
				<label>类型值：</label>
				<input type="text" readonly="readonly" name="goodsTypeValue.typeValueName" size="30" value="${goodsTypeValue.typeValueName }" />
				<a class="btnLook" width="1000" height="650" href="${rootUrl}/goods/type-class/0/dialog" lookupGroup="goodsTypeValue">类型值</a>
			</p>
   		 </div>
    	<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button id="theSubmit" type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
			<c:if test=""></c:if>
		</div>
    </form>
    	
</div>
<script>
	function beforSub(obj){
		$("#typeValueId").attr("name","goodsTypeValue.typeValue.id");
		$("#typeClassId").attr("name","goodsTypeValue.typeClass.id");
		return validateCallback(obj, _afterAjaxDone);
	}
	function _afterAjaxDone(json){
		$("#typeValueId").attr("name","goodsTypeValue.typeValueId");
		$("#typeClassId").attr("name","goodsTypeValue.typeClassId");
		newDialogAjaxDone(json);
	}
</script>